<?php

class ImageMapper extends AbstractMapper
{

    protected function _init()
    {
	$this->setModel(new ImageModel());
	$this->setTableName(IMAGE_TABLE);
    }

    public function removeRelations($id)
    {
	if (!$id) {
	    return false;
	}
	$this->createSqlCommand()->delete('opinion_link_image', 'image_id = :image_id', array(':image_id' => $id));
	$this->createSqlCommand()->delete('review_link_image', 'image_id = :image_id', array(':image_id' => $id));
    }

}
